package com.eigaland.change_machine.business.selectseat.buyseat

import android.view.View
import androidx.databinding.DataBindingUtil
import com.eigaland.change_machine.R
import com.eigaland.change_machine.business.movielist.MovieListItemVM
import com.eigaland.change_machine.business.show.ShowListItemVM
import com.eigaland.change_machine.databinding.FragmentBuyTicketBinding
import com.eigaland.change_machine.displaymodel.ShowDisplayModel
import com.eigland.eigaland_lib.base.BaseLazyFragment
import com.google.gson.Gson
import com.orhanobut.logger.Logger

public class BuySeatFragment :
    BaseLazyFragment<BuySeatFragmentVM, com.eigaland.change_machine.databinding.FragmentBuyTicketBinding>() {

    override fun initVM() {



    }

    override fun setUpViewData(view: View) {
        vm = BuySeatFragmentVM()
        var binding = DataBindingUtil.bind<FragmentBuyTicketBinding>(view)
        binding?.let {
            it.buyTicketVM = vm
            it.lifecycleOwner = this


            var show = arguments?.getSerializable("show") as ShowDisplayModel
            var movie = arguments?.getSerializable("movie") as MovieListItemVM


            vm?.movieName = movie.movieName
            vm?.movieHouse = show.houseName
            vm?.movieLanguage = show.language
        }
    }

    override fun setLayoutId() = R.layout.fragment_buy_ticket


}